﻿#include "UserController.h"

UserController::UserController()
{
    m_view = UserView::getInstance();
    m_model = UserModel::getInstance();
}

void UserController::showUser()
{
    m_model->readUserFromFile();
    m_view->showUser(m_model->getUserInfo());
}

void UserController::createUser()
{
    m_model->saveUser2File(m_view->createUser());
}

bool UserController::hasUser()
{
    return m_model->hasUser();
}
